<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
    <title>配送订单</title>
    <link rel="stylesheet" href="../css/style.css"/>
    <link rel="stylesheet" href="../css/font-awesome.min.css"/>
</head>
<body>
<div class="container">
    <div class="header">
        <a href="../index.html"><i class="icon-angle-left icon-large"></i></a>配送订单
    </div>
    <div class="main">
        <div class="tab-head">
            <span class="item active" data-href="#wfc">未分仓(2)</span>
            <span class="item" data-href="#yfc">已分仓(2)</span>
        </div>
        <div class="tab-panel active" id="wfc">
            <section id="wrapper-wfc"  style="top:3.5rem;bottom:4.6rem">
                <div>
                    <div class="pullDown">
                        <span class="pullDownLabel">下拉刷新</span>
                    </div>
                    <div class="recordlist">
                        <a href="peisongdanxq-wfp.html" class="sgls-item mt1">
                            <div>
                                <p>
                                    <span class="title">单据编号1：</span><span>配送-D0000001</span>
                                </p>

                                <p>
                                    <span class="title pull-left">要货门店：</span><span class="span3">三香店</span>
                                    <span class="pull-right"><i class="title">金额：</i><i class="text-nowrap">63800.00</i></span>
                                </p>

                                <p>
                                    <span class="title">下单时间：</span><span>2016.7.22 16:00</span>
                                </p>

                                <p>
                                    <span class="title">要求到货时间：</span><span>2016-07-07</span>
                                    <span class="pull-right"><i class="title">下单人：</i><i>李小姐</i></span>
                                </p>
                            </div>
                            <div class="check text-center">
                                <i class="icon-ok"></i>
                            </div>
                        </a>
                        <a href="peisongdanxq-wfp.html" class="sgls-item mt1">
                            <div>
                                <p>
                                    <span class="title">单据编号：</span><span>配送-D0000001</span>
                                </p>

                                <p>
                                    <span class="title pull-left">要货门店：</span><span class="span3">三香店</span>
                                    <span class="pull-right"><i class="title">金额：</i><i class="text-nowrap">63800.00</i></span>
                                </p>

                                <p>
                                    <span class="title">下单时间：</span><span>2016.7.22 16:00</span>
                                </p>

                                <p>
                                    <span class="title">要求到货时间：</span><span>2016-07-07</span>
                                    <span class="pull-right"><i class="title">下单人：</i><i>李小姐</i></span>
                                </p>
                            </div>
                            <div class="check text-center">
                                <i class="icon-ok"></i>
                            </div>
                        </a>
                    </div>
                    <div class="pullUp">
                        <span class="pullUpLabel">上拉加载更多</span>
                    </div>
                </div>
            </section>
            <input type="button" class="btn btn-block btn-fencang" value="分仓" disabled/>
        </div>
        <div class="tab-panel" id="yfc">
            <section id="wrapper-yfc" style="top:3.5rem">
                <div>
                    <div class="pullDown">
                        <span class="pullDownLabel">下拉刷新</span>
                    </div>
                    <div class="recordlist">
                        <a href="peisongdanxq.html" class="sgls-item mt1">
                            <p>
                                <span class="title">单据编号1：</span><span>配送-D0000001</span>
                            </p>

                            <p>
                                <span class="title pull-left">要货门店：</span><span class="span3">三香店</span>
                                <span class="pull-right">
                                    <i class="title">金额：</i>
                                    <i class="text-nowrap">63800.00</i>
                                </span>
                            </p>

                            <p>
                                <span class="title">下单时间：</span><span>2016.7.22 16:00</span>
                                <span class="pull-right"><i class="title">下单人：</i><i>李小姐</i></span>
                            </p>

                            <p>
                                <span class="title">要求到：</span><span>配送-D0000001</span>
                            </p>

                        </a>
                        <a href="peisongdanxq.html" class="sgls-item mt1">
                            <p>
                                <span class="title">采购订单号：</span><span>D0000001</span>
                            </p>

                            <p>
                                <span class="title pull-left">供应商：</span><span class="span4">可口可乐可口可乐可口可乐可口可乐可口可乐</span>
                                <span class="pull-right"><i class="title">金额：</i><i
                                        class="text-nowrap">63800.00</i></span>
                            </p>

                            <p>
                                <span class="title">下单时间：</span><span>2016.7.22 16:00</span>
                                <span class="pull-right"><i class="title">下单人：</i><i>李小姐</i></span>
                            </p>
                        </a>
                    </div>
                    <div class="pullUp">
                        <span class="pullUpLabel">上拉加载更多</span>
                    </div>
                </div>
            </section>
        </div>
    </div>
</div>
<script src="../js/zepto.min.js"></script>
<script src="../js/tabpanel.js"></script>
<script src="../js/msgBox.js"></script>
<script src="../js/iscroll.js"></script>
<script src="iscroll-fencang.js"></script>
<script>
    $(function () {
        $('.tab-head').tabs({});
        $(document).on('click', '.sgls-item .check', function () {
            var flag = false;
            $(this).find('.icon-ok').toggleClass('active').attr('data-value', '1');
            $(document).find('.icon-ok').each(function () {
                if ($(this).hasClass('active')) {
                    flag = true;
                    return false;
                }
            })
            if (flag) {
                $('.btn-fencang').removeAttr('disabled').removeClass('btn-default').addClass('btn-submit text-main');
            } else
                $('.btn-fencang').attr('disabled', 'true').removeClass('btn-submit text-main').addClass('btn-default');
            return false;
        });
        $('.tab-head .item').on('click', function () {
            scrollDiv = $($(this).attr('data-href')).children().attr("id");
            changePull(scrollDiv);
        });
        $('.btn-fencang').on('click', function () {
            $.msgbox({
                msgContent: '确定分仓',
                showTitle: false,
                title: '备注',
                buttons: ['取消', '确定'],
                cancel: function () {
                },
                submit: function () {
//                todo 保存
                },
                close: false
            });
        })
    });
</script>
</body>
</html>